function uploadReport(eid) {
	if (refreshWin('uploadReport' + eid)) return;
	if (sys.guest)
		showLogin(onload);
	else
		onload();

	function onload() {
		if (!sys.student) {
			alertx('仅学生用户能上传实验报告！');
			return;
		}
		ajax({
					url : url.isReportUploaded,
					params : {
						eid : eid
					},
					success : function(ret) {
						if (ret.result)
							confirmx('本实验您已上传实验报告，<br />需要再次上传并覆盖掉原来的报告吗？', loadwin);
						else
							loadwin();
					}
				});
	}

	function loadwin() {
		var upload = new Ext.ux.FileUploadField({
					fieldLabel : '选择报告',
					buttonText : '浏览...',
					name : 'userfile',
					allowBlank : false,
					emptyText : '请选择实验报告(仅支持doc、zip、rar格式)',
					anchor : '98%'
				});

		var form = new Ext.FormPanel({
					frame : true,
					labelAlign : 'right',
					labelWidth : 60,
					autoHeight : true,
					fileUpload : true,
					bodyStyle : 'padding-top:5px',
					items : [upload],
					fbar : new Ext.Toolbar({
								items : [new Ext.Button({
													text : '取消',
													iconCls : 'cancel-icon',
													handler : function() {
														win.close();
													}
												}), new Ext.Button({
													text : '确定',
													iconCls : 'ok-icon',
													handler : onupload
												})]
							})
				});
		var win = new Ext.Window({
					id : 'uploadReport' + eid,
					title : '上传实验报告',
					iconCls : 'report-icon',
					manager : ui.windows,
					layout : 'fit',
					width : 400,
					autoHeight : true,
					minWidth : 300,
					items : form
				});
		win.show();

		function onupload() {
			var furl = upload.getValue();
			if (Ext.isEmpty(furl)) {
				alerterr('请选择本地实验报告文件！');
				return;
			}
			var type = furl.substring(furl.length - 3).toLowerCase();
			if (type != 'doc' && type != 'zip' && type != 'rar') {
				alerterr('仅支持doc、zip、rar格式的实验报告！');
				return;
			}
			var params = {
				eid : eid
			};
			ajaxform({
						form : form,
						params : params,
						url : url.uploadReport,
						waitmsg : '正在上传......',
						waitTitle : '请等待',
						success : function() {
							alertx('上传成功！');
							refreshTab('showExperimentList');
							win.close();
						}
					});
		}
	}
}